/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import { EntityRepository, Repository } from "typeorm";
import { BingoEntity } from "../entity/BingoEntity";
import { v4 } from "uuid";

@EntityRepository(BingoEntity)
export class BingoRepository extends Repository<BingoEntity> {

    findByCode(code: string) {
		return this.findOne({code});
    }

    findByCurrent(current : boolean) {

    	//console.log(v4());

		return this.findOne({
			where: {
				current : current
			}
		});
    }


}
